<script setup>
import { RouterView } from 'vue-router'
import {userStore} from "@/stores/UserStore.js"
import {onMounted} from "vue";
import {useRouter,} from 'vue-router'
const router = useRouter();

onMounted(() => {
 if(!userStore().userinfo.username){
    router.push("/login")
 }
})



</script>

<template>
  <RouterView />
  <van-tabbar :placeholder="true" v-show="$route.meta.keepAlive" route inactive-color="#9e9e9e" safe-area-inset-bottom>
    <van-tabbar-item replace to="/" icon="star-o">日志</van-tabbar-item>
<!--    <van-tabbar-item replace to="/daily" icon="search">日程</van-tabbar-item>-->
    <van-tabbar-item replace :to="{path:'/home',query:{urlll:userStore().userinfo.userId }}" icon="user-o">我</van-tabbar-item>
  </van-tabbar>
</template>

<style scoped>

</style>
